<template>
  <div>
    <el-form
      ref="form"
      class="add-form2"
      :model="form"
      label-width="120px"
      :disabled="true"
    >
      <div class="add-mid-title">检验项目</div>
      <el-form-item label="镀层" prop="claddingMaterial">
        <el-radio v-model="form.claddingMaterial" label="0">合格</el-radio>
        <el-radio v-model="form.claddingMaterial" label="1">不合格</el-radio>
      </el-form-item>
      <el-form-item label="涂层" prop="coating">
        <el-radio v-model="form.coating" label="0">合格</el-radio>
        <el-radio v-model="form.coating" label="1">不合格</el-radio>
      </el-form-item>
      <el-form-item label="外观" prop="appearance">
        <el-radio v-model="form.appearance" label="0">合格</el-radio>
        <el-radio v-model="form.appearance" label="1">不合格</el-radio>
      </el-form-item>
      <el-form-item label="规格型号" prop="specificationsModel">
        <el-radio v-model="form.specificationsModel" label="0">一致</el-radio>
        <el-radio v-model="form.specificationsModel" label="1">不一致</el-radio>
      </el-form-item>
      <el-form-item label="数量" prop="quantity">
        <el-radio v-model="form.quantity" label="0">一致</el-radio>
        <el-radio v-model="form.quantity" label="1">不一致</el-radio>
      </el-form-item>
      <el-form-item label="合格证明" prop="certificate">
        <el-radio v-model="form.certificate" label="0">有</el-radio>
        <el-radio v-model="form.certificate" label="1">无</el-radio>
      </el-form-item>
      <el-form-item label="螺纹" prop="screwThread">
        <el-radio v-model="form.screwThread" label="0">合格</el-radio>
        <el-radio v-model="form.screwThread" label="1">不合格</el-radio>
      </el-form-item>
      <div class="add-mid-title">检验结果</div>
      <el-form-item label="检验方式" prop="inspectionMethod">
        <el-select v-model="form.inspectionMethod">
          <el-option
            v-for="dict in dict.type.inspection_method"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          >
          </el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="检验方法" prop="testMethod">
        <el-select v-model="form.testMethod">
          <el-option
            v-for="dict in dict.type.test_method"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          >
          </el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="检验员" prop="checkoutId">
        <el-select v-model="form.checkoutId">
          <el-option
            v-for="item in userList"
            :key="item.userId"
            :label="item.nickName"
            :value="item.userId"
          >
          </el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="数量" prop="quantityquantity">
        <el-input-number
          v-model="form.quantityquantity"
          :min="0"
          :max="99999999"
          :precision="0"
        />
      </el-form-item>
      <el-form-item label="不合格处置情况" prop="disposalSituation" style="width: 100%">
        <el-input
          type="textarea"
          v-model="form.disposalSituation"
          maxlength="100" show-word-limit
          
        />
      </el-form-item>
      <el-form-item label="备注" prop="remark" style="width: 100%">
        <el-input type="textarea" v-model="form.remark" maxlength="100" show-word-limit  />
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
import { getExamInfo } from "@/api/synthesize/outsource/oentrance";
import { getUserList } from "@/api/selectList";
export default {
  name: "OutSourceExamInfo",
  dicts: ["inspection_method", "test_method"],
  props: {
    id: {
      type: String,
      required: true,
      default: "",
    },
  },
  watch: {
    id() {
      this.getInfo();
    },
  },
  data() {
    return {
      form: {},
      userList: [],
    };
  },
  created() {
    this.getInfo();
    getUserList().then((res) => {
      this.userList = res.rows;
    });
  },
  methods: {
    getInfo() {
      this.form = {};
      getExamInfo(this.id).then((res) => {
        this.form = res.data;
      });
    },
  },
};
</script>

<style lang="scss" scoped>
::v-deep .el-table__fixed-header-wrapper .fixed-width {
	width: 180px !important;
}
.add-mid-title {
	width: 100%;
	margin: 20px 0 10px 0;
}
</style>
